"""
ASGI config for cmdb_BE project.

It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""

import os
import django


# 启用channels默认路由，websocket有daphne支持
from channels.routing import get_default_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cmdb_BE.settings')
# 初始化django环境
django.setup()

# 应用channels路由
application = get_default_application()
